<template>

  <div class="trend">
    <ul class="nav">
      <li v-for="(item, index) of types" :key="index" >{{item}}</li>
    </ul>
    {{obj.favoriteColor}}
  </div>
</template>


<script>
export default {
  name: 'MyStu',
  data(){
      return {
          selectedtab: 0, //当前位置
          types: ["基地","蔬菜1","蔬菜2","蔬菜3","蔬菜4","蔬菜5","蔬菜6","蔬菜7"],
          obj:{a:"aaa"}


      }
  },
  mounted:function() { //钩子函数
      this.setList();
  },
  methods: {
      setList:function() {

          setTimeout(()=>{
              this.$set(this.obj, 'b', 'bbb')
              this.obj = Object.assign({}, this.obj, {
                  age: 27,
                  favoriteColor: 'Vue Green'
              })
          },2000)

      }
  },
  props: {
    msg: String
  }
}
</script>
<style>


</style>
